4304953353e7de0782bcc903f15e2d272e5ba81f,test/src/org/cacheonix/impl/cache/distributed/partitioned/TransferBucketRequestTest.java,TransferBucketRequestTest,createKeyStore,#,130

Before Change


      keyStore.setObjectSizeCalculator(new DummyObjectSizeCalculator());
      keyStore.setDiskStorage(new DummyDiskStorage("test"));
      keyStore.setInvalidator(new DummyCacheInvalidator());
      keyStore.setDataSource(new DummyBinaryStoreDataSource());
      keyStore.setDataStore(new DummyDataStore());
      keyStore.attachToByteCounter(new SharedCounter(0L));
      keyStore.attachToElementCounter(new SharedCounter(0L));

After Change


   private BinaryStore createKeyStore() {

      // Test context
      final BinaryStoreContext context = new BinaryStoreContextImpl();
      context.setObjectSizeCalculator(new DummyObjectSizeCalculator());
      context.setDiskStorage(new DummyDiskStorage("test.cache"));
      context.setDataSource(new DummyBinaryStoreDataSource());
      context.setInvalidator(new DummyCacheInvalidator());
      context.setDataStore(new DummyDataStore());

      final BinaryStore keyStore = new BinaryStore(getClock(), Integer.MAX_VALUE, Integer.MAX_VALUE);
      keyStore.attachToByteCounter(new SharedCounter(0L));
      keyStore.attachToElementCounter(new SharedCounter(0L));
      keyStore.setContext(context);

      return keyStore;
   }